package com.shelpe.services.sinbad.repository.jpa;

import java.util.Date;
import java.util.List;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;

import com.shelpe.services.sinbad.entity.jpa.CampaignLog;
import com.shelpe.services.sinbad.entity.jpa.CampaignLog.Action;

public interface CampaignLogRepository
		extends PagingAndSortingRepository<CampaignLog, Long>, JpaSpecificationExecutor<CampaignLog> {

	Page<CampaignLog> findByCampaignIDAndUpdatedTimeAfterOrderByUpdatedTimeDesc(long campaignID, Date date,
			Pageable page);
	
	List<CampaignLog> findByCampaignIDAndUpdatedTimeAfterAndAction(long campaignID, Date date, Action action);
}
